package model

import (
	"gorm.io/gorm"
	"time"
)

type Play struct {
	Id        uint           `gorm:"column:id;type:bigint(11) UNSIGNED;primaryKey;not null;" json:"id"`
	Userid    uint           `gorm:"column:userId;type:bigint(10) UNSIGNED;not null;default:0;" json:"userId"`
	Content   string         `gorm:"column:content;type:varchar(255);not null;" json:"content"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (p *Play) TableName() string {
	return "play"
}
